/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * frmCallCenter.java
 *
 * Created on May 22, 2011, 7:28:02 AM
 */

package Callcenter;

import Account.SizeMonition;
import Login.frmLogin;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Types;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Vector;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author BachDEV
 */
public class frmCallCenter extends javax.swing.JFrame {

    public Vector listComplain;
    public Vector columnComplain;
    public Vector listCustomer;
    public Vector columnCustomer;
    public Vector listOrder;
    public Vector columnOrder;
    public JTable tblCustomer;
    public JTable tblOrder;
    public JTable tblComplain;
    Login.frmLogin login;
    public static int x;
    public static int y;

    /** Creates new form frmCallCenter */
   public frmCallCenter(frmLogin login) {
        try{
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        }catch(InstantiationException ex){
            ex.printStackTrace();
        }catch(UnsupportedLookAndFeelException ex){
            ex.printStackTrace();
        }catch(ClassNotFoundException ex){
            ex.printStackTrace();
        }catch(IllegalAccessException ex){
            ex.printStackTrace();
        }
        initComponents();
        this.login = login;
        Dimension ds = Toolkit.getDefaultToolkit().getScreenSize();
            x = this.getWidth();
            y = this.getHeight();
            this.setLocation((ds.width - this.getWidth()) / 2, (ds.height - this.getHeight()) / 2);
        try {
            btnDetails.setEnabled(false);
            btnUpdateStatus.setEnabled(false);
            mnuItemOrderDetails.setEnabled(false);
            mnuItemUpdateStatus.setEnabled(false);
            displayCustomer();
            displayOrder();
            displayComplain();
            lbUsername.setText(this.login.txtUserName.getText());

        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
    }

    public void motion() {
        this.setSize(0, 0);
        new Thread(new SizeMonition(this, x, y)).start();
    }
   ///////////////////////////////////////////////////////////////////////////
    public void displayComplain() throws Exception {
        try {
            columnComplain = getColumn(4);
            listComplain = getData(4);
            tblComplain = new JTable(listComplain, columnComplain);
            tblComplain.getColumnModel().getColumn(0).setMinWidth(0);
            tblComplain.getColumnModel().getColumn(0).setWidth(0);
            tblComplain.getColumnModel().getColumn(0).setMaxWidth(0);
            tblComplain.addMouseListener(new MouseListener() {

                public void mouseClicked(MouseEvent e) {
                    if (tblComplain.getValueAt(tblComplain.getSelectedRow(), 6).toString().equals("Fixed")) {
                        btnUpdateStatus.setEnabled(false);
                        mnuItemUpdateStatus.setEnabled(false);
                    } else {
                        btnUpdateStatus.setEnabled(true);
                        mnuItemUpdateStatus.setEnabled(true);
                    }
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseReleased(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }
            });
            tblComplain.addKeyListener(new KeyListener() {

                public void keyTyped(KeyEvent e) {
                }

                public void keyPressed(KeyEvent e) {
                }

                public void keyReleased(KeyEvent e) {
                    if (tblComplain.getValueAt(tblComplain.getSelectedRow(), 6).toString().equals("Fixed")) {
                        btnUpdateStatus.setEnabled(false);
                        mnuItemUpdateStatus.setEnabled(false);
                    } else {
                        btnUpdateStatus.setEnabled(true);
                        mnuItemUpdateStatus.setEnabled(true);
                    }
                }
            });
            scrComplain.setViewportView(tblComplain);
        } catch (Exception ex) {
            throw ex;
        }
    }

    public void displayCustomer() throws Exception {
        try {
            columnCustomer = getColumn(2);
            listCustomer = getData(2);
            tblCustomer = new JTable(listCustomer, columnCustomer);
            tblCustomer.getColumnModel().getColumn(0).setMinWidth(0);
            tblCustomer.getColumnModel().getColumn(0).setWidth(0);
            tblCustomer.getColumnModel().getColumn(0).setMaxWidth(0);
            scrCustomer.setViewportView(tblCustomer);
        } catch (Exception ex) {
            throw ex;
        }
    }

    public void displayOrder() throws Exception {
        try {
            columnOrder = getColumn(3);
            listOrder = getData(3);
            tblOrder = new JTable(listOrder, columnOrder);
            tblOrder.getColumnModel().getColumn(0).setMinWidth(0);
            tblOrder.getColumnModel().getColumn(0).setWidth(0);
            tblOrder.getColumnModel().getColumn(0).setMaxWidth(0);
            tblOrder.addMouseListener(new MouseListener() {

                public void mouseClicked(MouseEvent e) {
                    btnDetails.setEnabled(true);
                    mnuItemOrderDetails.setEnabled(true);
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseReleased(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }
            });
            tblOrder.addKeyListener(new KeyListener() {

                public void keyTyped(KeyEvent e) {
                }

                public void keyPressed(KeyEvent e) {
                }

                public void keyReleased(KeyEvent e) {
                    if (tblOrder.getSelectedRow() != -1) {
                        btnDetails.setEnabled(true);
                        mnuItemOrderDetails.setEnabled(true);
                    }
                }
            });
            scrOrder.setViewportView(tblOrder);
        } catch (Exception ex) {
            throw ex;
        }
    }

    public Vector getColumn(int type) {
        Vector vt = new Vector();
        switch (type) {
            case 2:
                vt.add("ID");
                vt.add("Name");
                vt.add("Address");
                vt.add("Phone");
                vt.add("Email");
                vt.add("Status");
                vt.add("Dispatch No.");
                break;
            case 3:
                vt.add("ID");
                vt.add("Date");
                vt.add("Customer Name");
                vt.add("Recipients");
                vt.add("Address");
                vt.add("Phone");
                vt.add("Payment status");
                vt.add("Dispatch status");
                break;
            case 4:
                vt.add("ComID");
                vt.add("Description");
                vt.add("Customer Name");
                vt.add("Product Name");
                vt.add("Date Receive");
                vt.add("Date Fixed");
                vt.add("Status");
                break;
        }

        return vt;
    }

    public Vector getData(int type) throws Exception {
        Vector data = new Vector();
        Vector row;
        Connection connect = null;
        PreparedStatement stmt = null;
        ResultSet rs = null;
        String sql = "";
        switch (type) {
            case 2:
                sql = "Select * from Customer";
                break;
            case 3:
                sql = "select ordID,ordDate,cusName,ordName,ordAddress,ordPhone,payStatus,disStatus from Orders join Customer on Orders.cusID = Customer.cusID";
                break;
            case 4:
                sql = "Select comID,comDescription,cusName,proName,comDateReceive,comDateFixed,comStatus " +
                        "from Customer join Complain on Customer.cusID=Complain.cusID join Product on" +
                        " Complain.proID=Product.proID";
        }
        try {
            connect = Connections.DBConnection.getConnection("eProject", "sa", "123");
            stmt = connect.prepareStatement(sql);
            rs = stmt.executeQuery();
            while (rs.next()) {
                row = new Vector();
                boolean status = true;
                switch (type) {
                    case 2:
                        row.add(rs.getInt("cusID"));
                        row.add(rs.getString("cusName"));
                        row.add(rs.getString("cusAddress"));
                        row.add(rs.getString("cusPhone"));
                        row.add(rs.getString("cusEmail"));
                        status = rs.getBoolean("cusStatus");
                        if (status) {
                            row.add("Enable");
                        } else {
                            row.add("Disable");
                        }
                        row.add(rs.getString("DispatchNo"));
                        break;
                    case 3:
                        row.add(rs.getInt("ordID"));
                        row.add(rs.getDate("ordDate"));
                        row.add(rs.getString("cusName"));
                        row.add(rs.getString("ordName"));
                        row.add(rs.getString("ordAddress"));
                        row.add(rs.getString("ordPhone"));
                        boolean payStatus = rs.getBoolean("payStatus");
                        if (payStatus) {
                            row.add("Paid");
                        } else {
                            row.add("Unpaid");
                        }
                        boolean disStatus = rs.getBoolean("disStatus");
                        if (disStatus) {
                            row.add("Delivered");
                        } else {
                            row.add("Not delivered");
                        }
                        break;
                    case 4:
                        row.add(rs.getInt("comID"));
                        row.add(rs.getString("comDescription"));
                        row.add(rs.getString("cusName"));
                        row.add(rs.getString("proName"));
                        row.add(rs.getDate("comDateReceive"));
                        Date datefixed = rs.getDate("comDateFixed");
                        if (datefixed == null) {
                            row.add("Null");
                        } else {
                            row.add(datefixed);
                        }
                        boolean statusCom = rs.getBoolean("comStatus");
                        if (statusCom) {
                            row.add("Fixed");
                        } else {
                            row.add("Unfix");
                        }
                        break;
                }

                data.add(row);
            }
        } catch (Exception ex) {
            throw ex;
        } finally {
            try {
                Connections.DBConnection.closeConnection(connect, stmt, rs);
            } catch (Exception ex) {
                throw ex;
            }
        }
        return data;
    }
    //////////////////////////////////////////////////////////////////////////
     public JTable filterByPaymentStatus() throws Exception {
        JTable table = null;
        Connection connect = null;
        PreparedStatement stmt = null;
        ResultSet rs = null;
        Vector column = new Vector();
        column.add("ID");
        column.add("Date");
        column.add("Customer Name");
        column.add("Recipients");
        column.add("Address");
        column.add("Phone");
        column.add("Payment status");
        column.add("Dispatch status");
        Vector data = new Vector();
        Vector row = null;

        String sql = "";
        if (cbFilterPayment.getSelectedIndex() == 0) {
            sql = "select ordID,ordDate,cusName,ordName,ordAddress,ordPhone,payStatus,disStatus from Orders join " +
                    "Customer on Orders.cusID = Customer.cusID";
        } else {
            sql = "select ordID,ordDate,cusName,ordName,ordAddress,ordPhone,payStatus,disStatus from Orders join " +
                    "Customer on Orders.cusID = Customer.cusID where payStatus=?";
        }
        try {
            connect = Connections.DBConnection.getConnection("eProject", "sa", "123");
            stmt = connect.prepareStatement(sql);
            if (cbFilterPayment.getSelectedIndex() != 0) {
                switch (cbFilterPayment.getSelectedIndex()) {
                    case 1:
                        stmt.setBoolean(1, true);
                        break;
                    case 2:
                        stmt.setBoolean(1, false);
                        break;
                }
            }
            rs = stmt.executeQuery();
            while (rs.next()) {
                row = new Vector();
                row.add(rs.getInt("ordID"));
                row.add(rs.getDate("ordDate"));
                row.add(rs.getString("cusName"));
                row.add(rs.getString("ordName"));
                row.add(rs.getString("ordAddress"));
                row.add(rs.getString("ordPhone"));
                boolean payStatus = rs.getBoolean("payStatus");
                if (payStatus) {
                    row.add("Paid");
                } else {
                    row.add("Unpaid");
                }
                boolean disStatus = rs.getBoolean("disStatus");
                if (disStatus) {
                    row.add("Delivered");
                } else {
                    row.add("Not delivered");
                }
                data.add(row);
            }
            table = new JTable(data, column);
            table.getColumnModel().getColumn(0).setMinWidth(0);
            table.getColumnModel().getColumn(0).setMaxWidth(0);
            table.addMouseListener(new MouseListener() {

                public void mouseClicked(MouseEvent e) {
                    btnDetails.setEnabled(true);
                    btnDetails.setEnabled(false);
                    mnuItemOrderDetails.setEnabled(false);
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseReleased(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }
            });
            table.addKeyListener(new KeyListener() {

                public void keyTyped(KeyEvent e) {
                }

                public void keyPressed(KeyEvent e) {
                }

                public void keyReleased(KeyEvent e) {
                    if(tblOrder.getSelectedRow()!=-1){
                        btnDetails.setEnabled(true);
                        btnDetails.setEnabled(false);
                        mnuItemOrderDetails.setEnabled(false);
                    }
                }
            });
        } catch (Exception ex) {
            throw ex;
        } finally {
            try {
                Connections.DBConnection.closeConnection(connect, stmt, rs);
            } catch (Exception ex) {
                throw ex;
            }
        }

        return table;
    }

    public JTable filterByDispatchStatus() throws Exception {
        JTable table = null;
        Connection connect = null;
        PreparedStatement stmt = null;
        ResultSet rs = null;
        Vector column = new Vector();
        column.add("ID");
        column.add("Date");
        column.add("Customer Name");
        column.add("Recipients");
        column.add("Address");
        column.add("Phone");
        column.add("Payment status");
        column.add("Dispatch status");
        Vector data = new Vector();
        Vector row = null;

        String sql = "";
        if (cbFilterDispatch.getSelectedIndex() == 0) {
            sql = "select ordID,ordDate,cusName,ordName,ordAddress,ordPhone,payStatus,disStatus from Orders join " +
                    "Customer on Orders.cusID = Customer.cusID";
        } else {
            sql = "select ordID,ordDate,cusName,ordName,ordAddress,ordPhone,payStatus,disStatus from Orders join " +
                    "Customer on Orders.cusID = Customer.cusID where disStatus=?";
        }
        try {
            connect = Connections.DBConnection.getConnection("eProject", "sa", "123");
            stmt = connect.prepareStatement(sql);
            if (cbFilterDispatch.getSelectedIndex() != 0) {
                switch (cbFilterDispatch.getSelectedIndex()) {
                    case 1:
                        stmt.setBoolean(1, true);
                        break;
                    case 2:
                        stmt.setBoolean(1, false);
                        break;
                }
            }
            rs = stmt.executeQuery();
            while (rs.next()) {
                row = new Vector();
                row.add(rs.getInt("ordID"));
                row.add(rs.getDate("ordDate"));
                row.add(rs.getString("cusName"));
                row.add(rs.getString("ordName"));
                row.add(rs.getString("ordAddress"));
                row.add(rs.getString("ordPhone"));
                boolean payStatus = rs.getBoolean("payStatus");
                if (payStatus) {
                    row.add("Paid");
                } else {
                    row.add("Unpaid");
                }
                boolean disStatus = rs.getBoolean("disStatus");
                if (disStatus) {
                    row.add("Delivered");
                } else {
                    row.add("Not delivered");
                }
                data.add(row);
            }
            table = new JTable(data, column);
            table.getColumnModel().getColumn(0).setMinWidth(0);
            table.getColumnModel().getColumn(0).setMaxWidth(0);
            table.addMouseListener(new MouseListener() {

                public void mouseClicked(MouseEvent e) {
                    btnDetails.setEnabled(true);
                    btnDetails.setEnabled(false);
                    mnuItemOrderDetails.setEnabled(false);
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseReleased(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }
            });
            table.addKeyListener(new KeyListener() {

                public void keyTyped(KeyEvent e) {
                }

                public void keyPressed(KeyEvent e) {
                }

                public void keyReleased(KeyEvent e) {
                    if(tblOrder.getSelectedRow()!=-1){
                        btnDetails.setEnabled(true);
                        mnuItemOrderDetails.setEnabled(false);
                    }
                }
            });
        } catch (Exception ex) {
            throw ex;
        } finally {
            try {
                Connections.DBConnection.closeConnection(connect, stmt, rs);
            } catch (Exception ex) {
                throw ex;
            }
        }

        return table;
    }

    public JTable searchOrders() throws Exception {
        JTable table = null;
        Connection connect = null;
        PreparedStatement stmt = null;
        ResultSet rs = null;
        Vector column = new Vector();
        column.add("ID");
        column.add("Date");
        column.add("Customer Name");
        column.add("Recipients");
        column.add("Address");
        column.add("Phone");
        column.add("Payment status");
        column.add("Dispatch status");
        Vector data = new Vector();
        Vector row = null;
        String s = "";
        switch (cbSearchOrder.getSelectedIndex()) {
            case 0:
                s = "cusName";
                break;
            case 1:
                s = "DispatchNo";
                break;
        }
        String sql = "select ordID,ordDate,cusName,ordName,ordAddress,ordPhone,payStatus,disStatus from Orders join " +
                "Customer on Orders.cusID = Customer.cusID where " + s + " like '%" + txtKeywordOrder.getText().trim() + "%'";
        try {
            connect = Connections.DBConnection.getConnection("eProject", "sa", "123");
            stmt = connect.prepareStatement(sql);
            rs = stmt.executeQuery();
            while (rs.next()) {
                row = new Vector();
                row.add(rs.getInt("ordID"));
                row.add(rs.getDate("ordDate"));
                row.add(rs.getString("cusName"));
                row.add(rs.getString("ordName"));
                row.add(rs.getString("ordAddress"));
                row.add(rs.getString("ordPhone"));
                boolean payStatus = rs.getBoolean("payStatus");
                if (payStatus) {
                    row.add("Paid");
                } else {
                    row.add("Unpaid");
                }
                boolean disStatus = rs.getBoolean("disStatus");
                if (disStatus) {
                    row.add("Delivered");
                } else {
                    row.add("Not delivered");
                }
                data.add(row);
            }
            table = new JTable(data, column);
            table.getColumnModel().getColumn(0).setMinWidth(0);
            table.getColumnModel().getColumn(0).setMaxWidth(0);
            table.addMouseListener(new MouseListener() {

                public void mouseClicked(MouseEvent e) {
                    btnDetails.setEnabled(true);
                     mnuItemOrderDetails.setEnabled(true);
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseReleased(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }
            });
            table.addKeyListener(new KeyListener() {

                public void keyTyped(KeyEvent e) {
                }

                public void keyPressed(KeyEvent e) {
                }

                public void keyReleased(KeyEvent e) {
                    if(tblOrder.getSelectedRow()!=-1){
                        btnDetails.setEnabled(true);
                        mnuItemOrderDetails.setEnabled(true);
                    }
                }
            });
        } catch (Exception ex) {
            throw ex;
        } finally {
            try {
                Connections.DBConnection.closeConnection(connect, stmt, rs);
            } catch (Exception ex) {
                throw ex;
            }
        }

        return table;

    }
    public JTable searchCustomer() throws Exception {
        Connection connect = null;
        PreparedStatement stmt = null;
        ResultSet rs = null;
        String s = "";
        Vector column = new Vector();
        column.add("ID");
        column.add("Name");
        column.add("Address");
        column.add("Phone");
        column.add("Email");
        column.add("Status");
        column.add("Dispatch No.");
        Vector data = new Vector();
        Vector row = null;
        JTable table = null;
        switch (cbSearchCustomer.getSelectedIndex()) {
            case 0:
                s = "cusName";
                break;
            case 1:
                s = "DispatchNo";
                break;
        }
        String sql = "Select * from Customer where " + s + " like '%" + txtKeywordCustomer.getText().trim() + "%'";
        try {
            connect = Connections.DBConnection.getConnection("eProject", "sa", "123");
            stmt = connect.prepareStatement(sql);
            rs = stmt.executeQuery();
            while (rs.next()) {
                row = new Vector();
                row.add(rs.getInt("cusID"));
                row.add(rs.getString("cusName"));
                row.add(rs.getString("cusAddress"));
                row.add(rs.getString("cusPhone"));
                row.add(rs.getString("cusEmail"));
                boolean status = rs.getBoolean("cusStatus");
                if (status) {
                    row.add("Enable");
                } else {
                    row.add("Disable");
                }
                row.add(rs.getString("DispatchNo"));
                data.add(row);
            }
            table = new JTable(data, column);
            table.getColumnModel().getColumn(0).setMinWidth(0);
            table.getColumnModel().getColumn(0).setMaxWidth(0);

        } catch (Exception ex) {
            throw ex;
        } finally {
            try {
                Connections.DBConnection.closeConnection(connect, stmt, rs);
            } catch (Exception ex) {
                throw ex;
            }
        }
        return table;
    }

    public void filterComplain() throws Exception {
        Connection connect = null;
        PreparedStatement stmt = null;
        ResultSet rs = null;
        Vector data = new Vector();
        Vector column = getColumn(4);
        Vector row = null;
        String sql="";
        if(cbOptionStatusComplain.getSelectedIndex()!=0){
        sql = "Select comID,comDescription,cusName,proName,comDateReceive,comDateFixed,comStatus " +
                "from Customer join Complain on Customer.cusID=Complain.cusID join Product on" +
                " Complain.proID=Product.proID where comStatus=?";
        }
        else{
            sql = "Select comID,comDescription,cusName,proName,comDateReceive,comDateFixed,comStatus " +
                "from Customer join Complain on Customer.cusID=Complain.cusID join Product on" +
                " Complain.proID=Product.proID";
        }
        try {
            connect = Connections.DBConnection.getConnection("eProject", "sa", "123");
            stmt = connect.prepareStatement(sql);
            if(cbOptionStatusComplain.getSelectedIndex()==1){
                stmt.setBoolean(1, true);
            }
            else{
                if(cbOptionStatusComplain.getSelectedIndex()==2)
                    stmt.setBoolean(1, false);
            }
            rs = stmt.executeQuery();
            while (rs.next()) {
                row = new Vector();
                row.add(rs.getInt("comID"));
                row.add(rs.getString("comDescription"));
                row.add(rs.getString("cusName"));
                row.add(rs.getString("proName"));
                row.add(rs.getDate("comDateReceive"));
                Date datefixed = rs.getDate("comDateFixed");
                if (datefixed == null) {
                    row.add("Null");
                } else {
                    row.add(datefixed);
                }
                boolean statusCom = rs.getBoolean("comStatus");
                if (statusCom) {
                    row.add("Fixed");
                } else {
                    row.add("Unfix");
                }
                data.add(row);
            }
            tblComplain = new JTable(data, column);
            tblComplain.getColumnModel().getColumn(0).setMinWidth(0);
            tblComplain.getColumnModel().getColumn(0).setWidth(0);
            tblComplain.getColumnModel().getColumn(0).setMaxWidth(0);
            tblComplain.addMouseListener(new MouseListener() {

                public void mouseClicked(MouseEvent e) {
                    if (tblComplain.getValueAt(tblComplain.getSelectedRow(), 6).toString().equals("Fixed")) {
                        btnUpdateStatus.setEnabled(false);
                        mnuItemUpdateStatus.setEnabled(false);
                    } else {
                        btnUpdateStatus.setEnabled(true);
                        mnuItemUpdateStatus.setEnabled(true);
                    }
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseReleased(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }
            });
            tblComplain.addKeyListener(new KeyListener() {

                public void keyTyped(KeyEvent e) {
                }

                public void keyPressed(KeyEvent e) {
                }

                public void keyReleased(KeyEvent e) {
                    if (tblComplain.getSelectedRow() != -1) {
                        if (tblComplain.getValueAt(tblComplain.getSelectedRow(), 6).toString().equals("Fixed")) {
                            btnUpdateStatus.setEnabled(false);
                            mnuItemUpdateStatus.setEnabled(false);
                        } else {
                            btnUpdateStatus.setEnabled(true);
                            mnuItemUpdateStatus.setEnabled(true);
                        }
                    }
                }
            });
            scrComplain.setViewportView(tblComplain);

        } catch (Exception ex) {
            throw ex;
        } finally {
            try {
                Connections.DBConnection.closeConnection(connect, stmt, rs);
            } catch (Exception ex) {
                throw ex;
            }
        }
    }

    public void searchComplain() throws Exception {
        Connection connect = null;
        PreparedStatement stmt = null;
        ResultSet rs = null;
        Vector data = new Vector();
        Vector column = getColumn(4);
        Vector row = null;
        String s = "";

        switch (cbOption.getSelectedIndex()) {
            case 0:
                s = "comDescription";
                break;
            case 1:
                s = "cusName";
                break;
            case 2:
                s = "proName";
                break;
        }
        String sql = "Select comID,comDescription,cusName,proName,comDateReceive,comDateFixed,comStatus " +
                "from Customer join Complain on Customer.cusID=Complain.cusID join Product on" +
                " Complain.proID=Product.proID where " + s + " like '%" + txtKeyword.getText().trim() + "%'";
        try {
            connect = Connections.DBConnection.getConnection("eProject", "sa", "123");
            stmt = connect.prepareStatement(sql);

            rs = stmt.executeQuery();
            while (rs.next()) {
                row = new Vector();
                row.add(rs.getInt("comID"));
                row.add(rs.getString("comDescription"));
                row.add(rs.getString("cusName"));
                row.add(rs.getString("proName"));
                row.add(rs.getDate("comDateReceive"));
                Date datefixed = rs.getDate("comDateFixed");
                if (datefixed == null) {
                    row.add("Null");
                } else {
                    row.add(datefixed);
                }
                boolean statusCom = rs.getBoolean("comStatus");
                if (statusCom) {
                    row.add("Fixed");
                } else {
                    row.add("Unfix");
                }
                data.add(row);
            }
            tblComplain = new JTable(data, column);
            tblComplain.getColumnModel().getColumn(0).setMinWidth(0);
            tblComplain.getColumnModel().getColumn(0).setWidth(0);
            tblComplain.getColumnModel().getColumn(0).setMaxWidth(0);
            tblComplain.addMouseListener(new MouseListener() {

                public void mouseClicked(MouseEvent e) {
                    if (tblComplain.getValueAt(tblComplain.getSelectedRow(), 6).toString().equals("Fixed")) {
                        btnUpdateStatus.setEnabled(false);
                        mnuItemUpdateStatus.setEnabled(false);
                    } else {
                        btnUpdateStatus.setEnabled(true);
                        mnuItemUpdateStatus.setEnabled(true);
                    }
                }

                public void mousePressed(MouseEvent e) {
                }

                public void mouseReleased(MouseEvent e) {
                }

                public void mouseEntered(MouseEvent e) {
                }

                public void mouseExited(MouseEvent e) {
                }
            });
            tblComplain.addKeyListener(new KeyListener() {

                public void keyTyped(KeyEvent e) {
                }

                public void keyPressed(KeyEvent e) {
                }

                public void keyReleased(KeyEvent e) {
                    if (tblComplain.getSelectedRow() != -1) {
                        if (tblComplain.getValueAt(tblComplain.getSelectedRow(), 6).toString().equals("Fixed")) {
                            btnUpdateStatus.setEnabled(false);
                            mnuItemUpdateStatus.setEnabled(false);
                        } else {
                            btnUpdateStatus.setEnabled(true);
                            mnuItemUpdateStatus.setEnabled(true);
                        }
                    }
                }
            });
            scrComplain.setViewportView(tblComplain);

        } catch (Exception ex) {
            throw ex;
        } finally {
            try {
                Connections.DBConnection.closeConnection(connect, stmt, rs);
            } catch (Exception ex) {
                throw ex;
            }
        }
    }

    public void changeStatusComplain() throws Exception {
        Connection connect = null;
        PreparedStatement stmt = null;
        String sql = "Update Complain set comStatus=?,comDateFixed=? where comID=?";
        try {
            connect = Connections.DBConnection.getConnection("eProject", "sa", "123");
            stmt = connect.prepareStatement(sql);
            stmt.setBoolean(1, true);
            DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
            Date date = new Date();
            String datetime = dateFormat.format(date);
            stmt.setObject(2,datetime,Types.VARCHAR);
            stmt.setInt(3, Integer.parseInt(tblComplain.getValueAt(tblComplain.getSelectedRow(), 0).toString()));
            stmt.executeUpdate();
            displayComplain();
        } catch (Exception ex) {
            throw ex;
        } finally {
            try {
                Connections.DBConnection.closeConnection(connect, stmt, null);
            } catch (Exception ex) {
                throw ex;
            }
        }
    }


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lbAdminCenter2 = new javax.swing.JLabel();
        lbUsername = new javax.swing.JLabel();
        lbAdminCenter = new javax.swing.JLabel();
        tabCalCenter = new javax.swing.JTabbedPane();
        panOrder = new javax.swing.JPanel();
        scrOrder = new javax.swing.JScrollPane();
        jLabel4 = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        btnDetails = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        cbSearchOrder = new javax.swing.JComboBox();
        jLabel15 = new javax.swing.JLabel();
        txtKeywordOrder = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        cbFilterPayment = new javax.swing.JComboBox();
        jLabel17 = new javax.swing.JLabel();
        cbFilterDispatch = new javax.swing.JComboBox();
        panCustomer = new javax.swing.JPanel();
        scrCustomer = new javax.swing.JScrollPane();
        jLabel3 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        txtKeywordCustomer = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        cbSearchCustomer = new javax.swing.JComboBox();
        panComplain = new javax.swing.JPanel();
        lbAdminCenter1 = new javax.swing.JLabel();
        scrComplain = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        cbOption = new javax.swing.JComboBox();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        txtKeyword = new javax.swing.JTextField();
        jButton3 = new javax.swing.JButton();
        btnUpdateStatus = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        cbOptionStatusComplain = new javax.swing.JComboBox();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnuTask = new javax.swing.JMenu();
        mnuOrderManager = new javax.swing.JMenu();
        mnuItemOrderDetails = new javax.swing.JMenuItem();
        mnuComplainManager = new javax.swing.JMenu();
        munItemAdd = new javax.swing.JMenuItem();
        mnuItemUpdateStatus = new javax.swing.JMenuItem();
        mnuItemLogout = new javax.swing.JMenuItem();
        munItemExit = new javax.swing.JMenuItem();
        mnuHelp = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Call Center");

        lbAdminCenter2.setText("Username:");

        lbUsername.setFont(new java.awt.Font("Tahoma", 1, 11));
        lbUsername.setForeground(new java.awt.Color(0, 0, 102));
        lbUsername.setText("Username:");

        lbAdminCenter.setFont(new java.awt.Font("Tahoma", 1, 14));
        lbAdminCenter.setText("Call center Management");

        tabCalCenter.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                tabCalCenterStateChanged(evt);
            }
        });

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel4.setText("List of Order");

        jButton2.setText("Exit");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        btnDetails.setText("Details");
        btnDetails.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDetailsActionPerformed(evt);
            }
        });

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Search"));

        jLabel14.setText("Search by");

        cbSearchOrder.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Customer name", "DispatchNo" }));

        jLabel15.setText("Keyword");

        txtKeywordOrder.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                txtKeywordOrderCaretUpdate(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14)
                    .addComponent(jLabel15))
                .addGap(36, 36, 36)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtKeywordOrder, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
                    .addComponent(cbSearchOrder, 0, 125, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(cbSearchOrder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(txtKeywordOrder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("Filter"));

        jLabel16.setText("By payment status");

        cbFilterPayment.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "All", "Paid", "Unpaid" }));
        cbFilterPayment.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbFilterPaymentItemStateChanged(evt);
            }
        });

        jLabel17.setText("By dispatch status");

        cbFilterDispatch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "All", "Delivered", "Not delivered" }));
        cbFilterDispatch.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbFilterDispatchItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addGap(29, 29, 29)
                        .addComponent(cbFilterPayment, 0, 140, Short.MAX_VALUE))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addGap(31, 31, 31)
                        .addComponent(cbFilterDispatch, 0, 140, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbFilterPayment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbFilterDispatch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout panOrderLayout = new javax.swing.GroupLayout(panOrder);
        panOrder.setLayout(panOrderLayout);
        panOrderLayout.setHorizontalGroup(
            panOrderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panOrderLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 106, Short.MAX_VALUE)
                .addComponent(btnDetails, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addComponent(scrOrder, javax.swing.GroupLayout.DEFAULT_SIZE, 888, Short.MAX_VALUE)
            .addGroup(panOrderLayout.createSequentialGroup()
                .addGap(403, 403, 403)
                .addComponent(jLabel4)
                .addContainerGap(408, Short.MAX_VALUE))
        );
        panOrderLayout.setVerticalGroup(
            panOrderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panOrderLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel4)
                .addGap(11, 11, 11)
                .addComponent(scrOrder, javax.swing.GroupLayout.PREFERRED_SIZE, 376, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panOrderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panOrderLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(btnDetails))
                    .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        tabCalCenter.addTab("Order list", panOrder);

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel3.setText("List of Customer");

        jButton1.setText("Exit");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Search"));

        jLabel12.setText("Keyword");

        txtKeywordCustomer.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                txtKeywordCustomerCaretUpdate(evt);
            }
        });

        jLabel13.setText("Search by");

        cbSearchCustomer.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Customer's Name", "Customer's Dispatch" }));

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addGap(26, 26, 26)
                        .addComponent(cbSearchCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addGap(32, 32, 32)
                        .addComponent(txtKeywordCustomer, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)))
                .addContainerGap(61, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(cbSearchCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(txtKeywordCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout panCustomerLayout = new javax.swing.GroupLayout(panCustomer);
        panCustomer.setLayout(panCustomerLayout);
        panCustomerLayout.setHorizontalGroup(
            panCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panCustomerLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 497, Short.MAX_VALUE)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addComponent(scrCustomer, javax.swing.GroupLayout.DEFAULT_SIZE, 888, Short.MAX_VALUE)
            .addGroup(panCustomerLayout.createSequentialGroup()
                .addGap(386, 386, 386)
                .addComponent(jLabel3)
                .addContainerGap(400, Short.MAX_VALUE))
        );
        panCustomerLayout.setVerticalGroup(
            panCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panCustomerLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3)
                .addGap(11, 11, 11)
                .addComponent(scrCustomer, javax.swing.GroupLayout.DEFAULT_SIZE, 374, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButton1)
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        tabCalCenter.addTab("Customer list", panCustomer);

        lbAdminCenter1.setFont(new java.awt.Font("Tahoma", 1, 12));
        lbAdminCenter1.setText("Complain list");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Search"));

        cbOption.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Complain", "Customer", "Product" }));
        cbOption.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbOptionActionPerformed(evt);
            }
        });

        jLabel1.setText("Search by");

        jLabel2.setText("Keyword");

        txtKeyword.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                txtKeywordCaretUpdate(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel1))
                .addGap(28, 28, 28)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cbOption, 0, 123, Short.MAX_VALUE)
                    .addComponent(txtKeyword, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE))
                .addGap(63, 63, 63))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbOption, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtKeyword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addContainerGap(27, Short.MAX_VALUE))
        );

        jButton3.setText("New Complain");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        btnUpdateStatus.setText("Update status");
        btnUpdateStatus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUpdateStatusActionPerformed(evt);
            }
        });

        jButton5.setText("Exit");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Filter"));

        jLabel5.setText("Status of Complain");

        cbOptionStatusComplain.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "All", "Fixed", "Unfix" }));
        cbOptionStatusComplain.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbOptionStatusComplainItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel5)
                .addGap(18, 18, 18)
                .addComponent(cbOptionStatusComplain, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(32, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(cbOptionStatusComplain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(64, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout panComplainLayout = new javax.swing.GroupLayout(panComplain);
        panComplain.setLayout(panComplainLayout);
        panComplainLayout.setHorizontalGroup(
            panComplainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panComplainLayout.createSequentialGroup()
                .addGroup(panComplainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panComplainLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(panComplainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(panComplainLayout.createSequentialGroup()
                                .addGap(44, 44, 44)
                                .addGroup(panComplainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(btnUpdateStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(panComplainLayout.createSequentialGroup()
                                .addGap(68, 68, 68)
                                .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addComponent(scrComplain, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 888, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(panComplainLayout.createSequentialGroup()
                        .addGap(400, 400, 400)
                        .addComponent(lbAdminCenter1)))
                .addContainerGap())
        );
        panComplainLayout.setVerticalGroup(
            panComplainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panComplainLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lbAdminCenter1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(scrComplain, javax.swing.GroupLayout.PREFERRED_SIZE, 361, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panComplainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panComplainLayout.createSequentialGroup()
                        .addGap(11, 11, 11)
                        .addGroup(panComplainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panComplainLayout.createSequentialGroup()
                        .addComponent(jButton3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnUpdateStatus)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton5)
                        .addGap(6, 6, 6)))
                .addContainerGap())
        );

        tabCalCenter.addTab("Complain", panComplain);

        mnuTask.setMnemonic('t');
        mnuTask.setText("Task");

        mnuOrderManager.setMnemonic('o');
        mnuOrderManager.setText("Order manager");

        mnuItemOrderDetails.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuItemOrderDetails.setText("Order details");
        mnuItemOrderDetails.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemOrderDetailsActionPerformed(evt);
            }
        });
        mnuOrderManager.add(mnuItemOrderDetails);

        mnuTask.add(mnuOrderManager);

        mnuComplainManager.setMnemonic('c');
        mnuComplainManager.setText("Complain manager");

        munItemAdd.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        munItemAdd.setText("Add new complain");
        munItemAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                munItemAddActionPerformed(evt);
            }
        });
        mnuComplainManager.add(munItemAdd);

        mnuItemUpdateStatus.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        mnuItemUpdateStatus.setMnemonic('u');
        mnuItemUpdateStatus.setText("Update status");
        mnuItemUpdateStatus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemUpdateStatusActionPerformed(evt);
            }
        });
        mnuComplainManager.add(mnuItemUpdateStatus);

        mnuTask.add(mnuComplainManager);

        mnuItemLogout.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));
        mnuItemLogout.setMnemonic('L');
        mnuItemLogout.setText("Logout");
        mnuItemLogout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemLogoutActionPerformed(evt);
            }
        });
        mnuTask.add(mnuItemLogout);

        munItemExit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));
        munItemExit.setMnemonic('x');
        munItemExit.setText("Exit");
        munItemExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                munItemExitActionPerformed(evt);
            }
        });
        mnuTask.add(munItemExit);

        jMenuBar1.add(mnuTask);

        mnuHelp.setMnemonic('H');
        mnuHelp.setText("Help");

        jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        jMenuItem2.setText("Help");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        mnuHelp.add(jMenuItem2);

        jMenuBar1.add(mnuHelp);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 913, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(tabCalCenter, javax.swing.GroupLayout.DEFAULT_SIZE, 893, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lbAdminCenter2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lbUsername)
                        .addGap(247, 247, 247)
                        .addComponent(lbAdminCenter)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 607, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbAdminCenter2)
                    .addComponent(lbUsername)
                    .addComponent(lbAdminCenter))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(tabCalCenter, javax.swing.GroupLayout.DEFAULT_SIZE, 557, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void mnuItemOrderDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuItemOrderDetailsActionPerformed
        // TODO add your handling code here:
        frmOrderDetails details = new frmOrderDetails(this);
        details.setVisible(true);
        details.setAlwaysOnTop(true);
        this.setEnabled(false);
}//GEN-LAST:event_mnuItemOrderDetailsActionPerformed

    private void munItemAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_munItemAddActionPerformed
        // TODO add your handling code here:
        frmAddComplain complain = new frmAddComplain(this);
        complain.setVisible(true);
        complain.setAlwaysOnTop(true);
        this.setEnabled(false);
}//GEN-LAST:event_munItemAddActionPerformed

    private void mnuItemUpdateStatusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuItemUpdateStatusActionPerformed
        // TODO add your handling code here:
        try {
            changeStatusComplain();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
}//GEN-LAST:event_mnuItemUpdateStatusActionPerformed

    private void mnuItemLogoutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuItemLogoutActionPerformed
        // TODO add your handling code here:
        int option = JOptionPane.showConfirmDialog(this, "Do you want to log out?", "Confirm", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
        if (option == JOptionPane.OK_OPTION) {
            dispose();
            login.setVisible(true);
            login.pwdPassword.setText("");
            login.txtUserName.setText("");
        }
}//GEN-LAST:event_mnuItemLogoutActionPerformed

    private void munItemExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_munItemExitActionPerformed
        // TODO add your handling code here:
        int option = JOptionPane.showConfirmDialog(this, "Are you sure?", "Exit Application", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
        if (option == JOptionPane.OK_OPTION) {
            System.exit(1);
        }
}//GEN-LAST:event_munItemExitActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        try {
            Runtime.getRuntime().exec("hh.exe " + "eProject.chm");
        } catch (IOException ex) {
        }
}//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        int option = JOptionPane.showConfirmDialog(this, "Are you sure?", "Exit Application", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
        if (option == JOptionPane.OK_OPTION) {
            System.exit(1);
        }
}//GEN-LAST:event_jButton2ActionPerformed

    private void btnDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDetailsActionPerformed
        // TODO add your handling code here:
        frmOrderDetails details = new frmOrderDetails(this);
        details.setVisible(true);
        details.setAlwaysOnTop(true);
        this.setEnabled(false);
}//GEN-LAST:event_btnDetailsActionPerformed

    private void txtKeywordOrderCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_txtKeywordOrderCaretUpdate
        // TODO add your handling code here:
        try {
            tblOrder = searchOrders();
            scrOrder.setViewportView(tblOrder);
            btnDetails.setEnabled(false);
            mnuItemOrderDetails.setEnabled(false);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
}//GEN-LAST:event_txtKeywordOrderCaretUpdate

    private void cbFilterPaymentItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbFilterPaymentItemStateChanged
        // TODO add your handling code here:
        try {
            tblOrder = filterByPaymentStatus();
            scrOrder.setViewportView(tblOrder);
            btnDetails.setEnabled(false);
            mnuItemOrderDetails.setEnabled(false);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
}//GEN-LAST:event_cbFilterPaymentItemStateChanged

    private void cbFilterDispatchItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbFilterDispatchItemStateChanged
        // TODO add your handling code here:
        try {
            tblOrder = filterByDispatchStatus();
            scrOrder.setViewportView(tblOrder);
            btnDetails.setEnabled(false);
            mnuItemOrderDetails.setEnabled(false);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
    }//GEN-LAST:event_cbFilterDispatchItemStateChanged

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        int option = JOptionPane.showConfirmDialog(this, "Are you sure?", "Exit Application", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
        if (option == JOptionPane.OK_OPTION) {
            System.exit(1);
        }
}//GEN-LAST:event_jButton1ActionPerformed

    private void txtKeywordCustomerCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_txtKeywordCustomerCaretUpdate
        // TODO add your handling code here:
        try {
            tblCustomer = searchCustomer();
            scrCustomer.setViewportView(tblCustomer);

        } catch (Exception ex) {
            ex.printStackTrace();
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
}//GEN-LAST:event_txtKeywordCustomerCaretUpdate

    private void cbOptionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbOptionActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_cbOptionActionPerformed

    private void txtKeywordCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_txtKeywordCaretUpdate
        // TODO add your handling code here:
        try {
            searchComplain();
            btnUpdateStatus.setEnabled(false);
            mnuItemUpdateStatus.setEnabled(false);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
}//GEN-LAST:event_txtKeywordCaretUpdate

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        frmAddComplain complain = new frmAddComplain(this);
        complain.setVisible(true);
        complain.setAlwaysOnTop(true);
        this.setEnabled(false);
}//GEN-LAST:event_jButton3ActionPerformed

    private void btnUpdateStatusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUpdateStatusActionPerformed
        // TODO add your handling code here:
        try {
            changeStatusComplain();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
    }//GEN-LAST:event_btnUpdateStatusActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        // TODO add your handling code here:
        int option = JOptionPane.showConfirmDialog(this, "Are you sure?", "Exit Application", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
        if (option == JOptionPane.OK_OPTION) {
            System.exit(1);
        }
}//GEN-LAST:event_jButton5ActionPerformed

    private void cbOptionStatusComplainItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbOptionStatusComplainItemStateChanged
        // TODO add your handling code here:
        try{
            filterComplain();
        } catch(Exception ex){
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
}//GEN-LAST:event_cbOptionStatusComplainItemStateChanged

    private void tabCalCenterStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_tabCalCenterStateChanged
        // TODO add your handling code here:
        if (tabCalCenter.getSelectedIndex() != 2) {
            mnuComplainManager.setEnabled(false);
        } else {
            mnuComplainManager.setEnabled(true);
        }
        if (tabCalCenter.getSelectedIndex() != 0) {
            mnuOrderManager.setEnabled(false);
        } else {
            mnuOrderManager.setEnabled(true);
        }
}//GEN-LAST:event_tabCalCenterStateChanged

    /**
    * @param args the command line arguments
    */

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnDetails;
    private javax.swing.JButton btnUpdateStatus;
    private javax.swing.JComboBox cbFilterDispatch;
    private javax.swing.JComboBox cbFilterPayment;
    private javax.swing.JComboBox cbOption;
    private javax.swing.JComboBox cbOptionStatusComplain;
    private javax.swing.JComboBox cbSearchCustomer;
    private javax.swing.JComboBox cbSearchOrder;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton5;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JLabel lbAdminCenter;
    private javax.swing.JLabel lbAdminCenter1;
    private javax.swing.JLabel lbAdminCenter2;
    private javax.swing.JLabel lbUsername;
    private javax.swing.JMenu mnuComplainManager;
    private javax.swing.JMenu mnuHelp;
    private javax.swing.JMenuItem mnuItemLogout;
    private javax.swing.JMenuItem mnuItemOrderDetails;
    private javax.swing.JMenuItem mnuItemUpdateStatus;
    private javax.swing.JMenu mnuOrderManager;
    private javax.swing.JMenu mnuTask;
    private javax.swing.JMenuItem munItemAdd;
    private javax.swing.JMenuItem munItemExit;
    private javax.swing.JPanel panComplain;
    private javax.swing.JPanel panCustomer;
    private javax.swing.JPanel panOrder;
    private javax.swing.JScrollPane scrComplain;
    private javax.swing.JScrollPane scrCustomer;
    private javax.swing.JScrollPane scrOrder;
    private javax.swing.JTabbedPane tabCalCenter;
    private javax.swing.JTextField txtKeyword;
    private javax.swing.JTextField txtKeywordCustomer;
    private javax.swing.JTextField txtKeywordOrder;
    // End of variables declaration//GEN-END:variables

}
